package com.wkbb.common.enums;

public enum SmartTeacherRoleEnum {
    //智慧校园角色类型:1:创建者3:超级管理员4:部门管理员5:应用管理员6:分校区管理员7:班主任:8:任课老师(辅导员)9:校长
    ROLE_1_TYPE(1,"创建者"),
    ROLE_3_TYPE(3,"超级管理员4"),
    ROLE_4_TYPE(4,"部门管理员5"),
    ROLE_5_TYPE(5,"应用管理员6"),
    ROLE_6_TYPE(6,"分校区管理员7"),
    ROLE_7_TYPE(7,"班主任"),
    ROLE_8_TYPE(8,"任课老师"),
    ROLE_9_TYPE(9,"校长");




    private Integer code;
    private String desc;

    SmartTeacherRoleEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    // 普通方法
    public static String getDesc(short code) {
        for (SmartTeacherRoleEnum SmartTeacherRoleEnum : SmartTeacherRoleEnum.values()) {
            if (SmartTeacherRoleEnum.getCode() == code) {
                return SmartTeacherRoleEnum.desc;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
